from object import *
from math import *
from characteristic import Characteristic
from transform import Transform

def rotate_matrix(matrix, angle, axis):
	rot_mat = [cos(angle), -sin(angle), 0, 0,
		sin(angle), cos(angle), 0, 0,
		0, 0, 1, 0,
		0, 0, 0, 1,
		];
	return mult_matrix(matrix, rot_mat)

def mult_matrix(mat1, mat2):
	mat_result = list(mat1)

	for i in range(0, 16):
	
		var1 = (mat1[(i%4)+0] *mat2[(i/4)*4+0])
		var2 = (mat1[(i%4)+4] *mat2[(i/4)*4+1])
		var3 = (mat1[(i%4)+8] *mat2[(i/4)*4+2])
		var4 = (mat1[(i%4)+12] *mat2[(i/4)*4+3])
		mat_result[i] = var1 +var2 +var3 +var4

	return list(mat_result)

class World:

	def __init__(self):
@OBJECTS_INITIALIZATION@

	def update(self):
@OBJECTS_UPDATE@
		pass

	def draw(self):
@OBJECTS_DRAW@
		pass
